<?php
/**
 * Created by PhpStorm.
 * User: wengdo
 * Date: 2016/1/12
 * Time: 13:38
 * smarty的相关业务逻辑处理页面
 */

$smarty->setTemplateDir(ROOT_PATH."templates");        //配置smarty
$smarty->setCompileDir(ROOT_PATH."templates/templates_c");
$smarty->setLeftDelimiter("<{");
$smarty->setRightDelimiter("}>");

/*图片路劲*/
$smarty->assign("user_logo",$user_logo);           //用户头像路劲
$smarty->assign("cases_thumb",$cases_thumb);     //案例缩略图路劲
$smarty->assign("slide_src",$slide_src);      //首页广告图路劲

if(isset($_COOKIE['userid'])){
    $sql = "SELECT * FROM user WHERE userid=".$_COOKIE['userid'];     //用户列表查询
    $result = $db->query($sql);
    $user = $db->fetch_one($result);

    $smarty->assign("userid",$user['userid']);     //用户id
    $smarty->assign("user",$user);
}
